<script>
    import MainMenu from "../libs/MainMenu.svelte";
    import MainContent from "../libs/MainContent.svelte";

    let child_slot = null

    function chage_child(component){
        child_slot = component.detail
    }
</script>

<MainContent>
    {#if child_slot}
        <svelte:component on:chage_child={chage_child} this={child_slot}></svelte:component>
    {:else}
        <MainMenu bind:child_slot={child_slot}></MainMenu>
    {/if}
</MainContent>